Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the operator to use Kubernetes 1.24 APIs, tested on Kubernetes 1.27.
Changes
go.mod
to use the K8S 1.24 APIsSubmitJobRequest
struct type to consider the fields all asomitempty
so they're included in the SubmitJob only if non-empty. This resolves a problem with newer versions of Flink that attempted to start the job from an empty-string savepoint URI, which would consistently fail. These fields are optional, so omitting them should be fine.###Testing
This was developed and tested against a k3d cluster of Kubernetes 1.27 with the following specs:
Steps
1. Build Operator
Next, tag the image and push to my local Docker image registry:
2. Deploy the Operator YAMLs
Update the
deploy/flinkk8soperator.yaml
file to use the image tag and name of my local image registry:Apply all the YAMLs in
deploy
using the Quick Start Guide.3. Build the Word Count app
Tag and push the image to my local registry:
4. Deploy Word Count
Update the
examples/wordcount/flink-operator-custom-resource.yaml
file to reference the new image with:Apply the YAML:
Monitor the Flink Application: